package com.itheima.pattern.singleton.demo5;

/**
 * 静态内部类方式
 */
public class Singleton {

    private Singleton(){}

    private static class SingletonHolder{
        private static final Singleton INSTANCE=new Singleton();
    }

    public static Singleton getInstance(){
        return SingletonHolder.INSTANCE;
    }
}
